INCLUDE(CMakeForceCompiler)
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_SYSTEM_PROCESSOR arm-eabi)

SET (CMAKE_CROSSCOMPILING 1)

SET( ANDROID 7 )
SET( ANDROID_PLATFORM android-5 )

file(TO_CMAKE_PATH "$ENV{ANDROID_SDK_ROOT}" ANDROID_SDK_ROOT)
file(TO_CMAKE_PATH "$ENV{ANDROID_NDK_ROOT}" ANDROID_NDK_ROOT)

SET(TOOLCHAIN_ROOT "${ANDROID_NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows")

CMAKE_FORCE_C_COMPILER( "${TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-gcc.exe" GNU)
CMAKE_FORCE_CXX_COMPILER( "${TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-g++.exe" GNU)

SET(CMAKE_FIND_ROOT_PATH "${ANDROID_NDK_ROOT}/platforms/${ANDROID_PLATFORM}/arch-arm")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

